<html>
  <head>
    <title>deck.gl ScreenGridLayer Example</title>

    <script src="https://unpkg.com/deck.gl@^8.0.0/dist.min.js"></script>

    <script src="https://api.tiles.mapbox.com/mapbox-gl-js/v1.4.0/mapbox-gl.js"></script>

    <style type="text/css">
      body {
        width: 100vw;
        height: 100vh;
        margin: 0;
      }
    </style>
  </head>

  <body></body>

  <script type="text/javascript">

    const {DeckGL, ScreenGridLayer} = deck;

    new DeckGL({
      mapStyle: 'https://basemaps.cartocdn.com/gl/dark-matter-nolabels-gl-style/style.json',
      initialViewState: {
        longitude: -119.3,
        latitude: 35.6,
        zoom: 6,
        maxZoom: 20
      },
      controller: true,
      layers: [
        new ScreenGridLayer({
          id: 'grid',
          data: 'https://raw.githubusercontent.com/visgl/deck.gl-data/master/examples/screen-grid/ca-transit-stops.json',
          opacity: 0.8,
          minColor: [0, 0, 0, 0],
          getPosition: d => d,
          cellSizePixels: 20
        })
      ]
    });

  </script>
</html>